package com.legsem.jhosync.voltdb.server;

import org.voltdb.ProcInfo;
import org.voltdb.SQLStmt;
import org.voltdb.VoltProcedure;
import org.voltdb.VoltTable;

@ProcInfo(partitionInfo = "USERS.LOGIN: 0", singlePartition = true)
public class DeleteUser extends VoltProcedure {

    public final SQLStmt sql = new SQLStmt("DELETE FROM USERS WHERE LOGIN = ?;");

    public VoltTable[] run(String login) throws VoltAbortException {
        voltQueueSQL(sql, login);
        return voltExecuteSQL();
    }
}
